import React,{Component} from "react";
import Bscroll from "better-scroll";

class Hot extends Component{
    constructor(){
        super();
        this.state={
            bscrollArr:["图片1","图片2","图片3","图片4"]
        }
    }
    render(){
        return <div className="bscroll">
            <ul>
                {
                    this.state.bscrollArr.map((item,index)=>{
                        return <li key={index}>{item}</li>
                    })
                }
        </ul>
        </div>
    }
    componentDidMount(){
        new Bscroll(".bscroll",{
            scrollX:true
        })
    }
}

export default Hot;